<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('clues', function (Blueprint $table) {
            $table->unsignedBigInteger('project_id')->nullable();
            $table->unsignedBigInteger('media_id')->nullable();
            $table->integer('status')->default(0);
            $table->integer('a_status')->default(0);
            $table->integer('crm_status')->default(0);
            $table->text('log')->nullable();
            $table->text('crm_response')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('clues', function (Blueprint $table) {
            $table->dropColumn('project_id');
            $table->dropColumn('media_id');
            $table->dropColumn('status');
            $table->dropColumn('a_status');
            $table->dropColumn('crm_status');
            $table->dropColumn('log');
            $table->dropColumn('crm_response');
        });
    }
};
